home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
UTILFILE
/
CAMS.LZH
/
CAMS12.ZIP
/
UP11TO12.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-03-16
|
2KB
|
84 lines
: CAMS database upgrade batch file
: requires a source disk(ette) and a destination disk(ette), both without colons
: syntax: install [source] [destination]
@ECHO OFF
: introduction
CLS
ECHO
ECHO
ECHO The database structures have changed between CAMS version 1.1 and 1.2
ECHO
ECHO For CAMS v 1.2 you must first run this program, then run CAMS
ECHO twice. The first run of CAMS will create the new databases. The
ECHO second will allow you the restore the data from the copies this
ECHO program will produce.
ECHO
ECHO If you do not want to run this program press Ctrl-C, otherwise
PAUSE
: get user verification of switches
ECHO Sample
ECHO from C:\CAMS\
ECHO
ECHO to A:\
ECHO
ECHO CAMS databases will be backed up:
ECHO from %1
ECHO
ECHO to %2
ECHO
ECHO If the source and destination above do not end with a "\" or have other
ECHO syntax errors press Ctrl-C, otherwise,
PAUSE
: test for command line switches
IF X%1X == XX GOTO crashfrom
IF X%2X == XX GOTO crashto
: do it
COPY %1active.dbf %2camsbak.dbf
COPY %1visits.dbf %2vrlbak.dbf
COPY %1visitper.dbf %2vrpbak.dbf
DEL %1*.ndx
IF EXIST %2camsbak.dbf DEL %1active.dbf
IF EXIST %2vrlbak.dbf DEL %1visits.dbf
IF EXIST %2vrpbak.dbf DEL %1visitper.dbf
IF NOT EXIST %2camsbak.dbf GOTO dberror
IF NOT EXIST %2vrlbak.dbf GOTO dberror
IF NOT EXIST %2vrpbak.dbf GOTO dberror
GOTO done
:crashfrom
ECHO You entered %0 %1
ECHO You must provide a "from" and "to" location. Terminating.
GOTO failed
:crashto
ECHO You entered %0
ECHO You must provide a "to" location. Terminating.
GOTO failed
:dberror
ECHO One of your databases did not copy from %1 to %2.
GOTO failed
:done
CLS
ECHO
ECHO
ECHO
ECHO
ECHO
ECHO
ECHO
ECHO
ECHO Finished.
ECHO
ECHO You should now run CAMS twice. One the first run, CAMS will create
ECHO new databases and terminate. On the second run, select restore data-
ECHO bases from the Data submenu.
ECHO
ECHO
ECHO To run CAMS, change to the CAMS directory and type "CAMS" and press ENTER.
:failed